Link to this headingTEA (Tiny Encryption Algorithm)
- Was used in the original Xbox
- 64 bit blocks
- 128 bit key
Link to this headingAttacks
Link to this headingEquivalent key attack
Link to this headingRelated Key attack
Link to this headingImplementation
Implementation:
= 0xffffffff
= 0x9E3779B9 #2654435769
= 0xC6EF3720
=
=
#Split input
=
#Pad so its a mult of 2
#Split into chunks of length 2
+=
return
= 0#INIT_TEMP
#32 Rounds
=
=
=
return
=
#Split input
=
#Split into chunks of length 2
+=
return
=
#32 Rounds
=
=
=
#print(z,y,temp)
return
#Test Vectors https://github.com/liut/TeaCrypt/blob/master/tea/tea_test.go
=
=
= b * 8
=
#Ciphertext: 0a3aea4140a9ba94
=
#Message: 0000000000000000
=
=
= b
=
#Ciphertext: f39c2f6a553ccffc
=
#Message: 0403020108070605
=
=
= b
=
#Ciphertext: a2c0b1deb35d747e
=
#Message: 0403020108070605
=
=
= b
=
#Ciphertext: 926b6c123e3a65c0
=
#Message: 67452301efcdab89